//导入request.js请求工具
import request from '@/utils/request.js'

//文章列表查询
export const homepageListService = (params) => {
    return request.get('/homepage/homepage', { params: params });
}

//文章列表查询
export const homepagefindByIdListService = (id) => {
    return request.get('/homepage/homepage/ArticleDetails?id=' + id);
}

//文章点赞
export const homepagefindLikeService = () => {
    return request.put('/homepage/homepage/ArticleDetails');
}

//查看当前文章所有留言
export const ArticleDetiailsListService = (id) => {
    return request.get('/homepage/homepage/ArticleDetails/' + id);
}

//文章评论
export const homepagefindByIdAddService = (CommentData, articleId) => {
    // console.log("userId"+userId.value+"ArticleId"+ArticleId.value+"comment"+comment.value)
    return request.post('/homepage/homepage/ArticleDetails/' + articleId, CommentData, articleId);
}




